<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGiftBagRechargeLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('gift_bag_recharge_log', function (Blueprint $table) {
            $table->increments('id');//自增id
            $table->integer('user_id')->comment('用户id');
            $table->tinyInteger('rank')->default(1)->comment('充值等级 1 600 2 3000 3 9800');
            $table->integer('diamond')->comment('充值钻石数量');
            $table->integer('award_pearl')->comment('奖励金豆数量');
            $table->tinyInteger('status')->default(0)->comment('0未领取 1已领取');
            $table->timestamps();
            $table->index(['user_id']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('gift_bag_recharge_log');
    }
}
